package com.akhan.jplearn;

import cn.hutool.core.lang.Console;
import com.akhan.jplearn.service.impl.BaseServiceImpl;
import com.akhan.jplearn.service.impl.SearchServiceImpl;
import com.akhan.jplearn.service.impl.SilenceWriteServiceImpl;
import com.google.common.collect.Maps;

import java.util.Map;
import java.util.Scanner;

/**
 * 五十音学习机
 *
 * @author YuKang
 * @date 2021/6/25 0:41
 */
public class Application {
    public static void main(String[] args) {
        Map<Integer, BaseServiceImpl> serviceMap = Maps.newHashMap();
        serviceMap.put(1, new SearchServiceImpl());
        serviceMap.put(2, new SilenceWriteServiceImpl());
        Console.log("**************************");
        Console.log("*** 现在让我们开始学习五十音吧");
        Console.log("*** 请选择模式:");
        Console.log("*** 1) 五十音速查");
        Console.log("*** 2) 五十音测验");
        Console.log("**************************");

        Scanner scanner = new Scanner(System.in);
        serviceMap.get(scanner.nextInt()).run();
    }
}
